import httpRequest from '@/utils/request.js'

// 获取广告轮播列表
export function getRotationList() {
	return httpRequest.get('/prod-api/api/metro/rotation/list')
}

// 获取线路列表
export function getLineList() {
	return httpRequest.get('/prod-api/api/metro/line/list')
}

// 获取站点列表
export function getStepList(lineId) {
	if (lineId) {
		return httpRequest.get('/prod-api/api/metro/step/list', `lineId=${lineId}`);
	} else {
		return httpRequest.get('/prod-api/api/metro/step/list');
	}
}

// 地铁站查询
export function getMetroList(name) {
	return httpRequest.get('/prod-api/api/metro/list', `currentName=${encodeURIComponent(name)}`);
}

// 获取乘车须知
export function getStatement(type) {
	return httpRequest.get('/prod-api/api/metro/statement', 'type=1');
}

// 获取地铁公告
export function getNoticeList() {
	return httpRequest.get('/prod-api/api/metro/notice/list');
}